1. Field of the Invention
The present invention relates to a communication system for use with a numerical controller or the like for data transfer, via a serial transmission line, between the numerical controller and one or more servo amplifiers/spindle amplifiers for servo motors in an object to be controlled, such as a drive mechanism for a machine tool.
2. Description of the Conventional Art
FIG. 11 illustrates a numerical controller hardware configuration (hereinafter referred to as the "topology") based on a serial real-time communication system (hereinafter referred to as the "SERCOS") between a numerical control mechanism and a drive mechanism for machine tools. The system has been adopted by the German Machine Tool Manufactures' Association (Vereins Deutscher Werkzeugmaschinenfabriken e.v.) and the Central Electrical and Electronic Industries' Society (Zentralverband Elektrotechnik- und Electronikindustrie e.V.).
In the SERCOS system, one or more master (M) stations 1 are installed in a numerical controller for making serial transmission to and from servo amplifiers, spindle amplifiers, etc. of a manufacturing machine. One or more slave (S) stations 2 are linked with the numerical controller by serial transmission and correspond to the control sections of the servo amplifiers and spindle amplifiers in the machine.
One or more drives (D) may be driven from the control sections of the slave stations 2 and specifically correspond to the power sections of the servo amplifiers/spindle amplifiers in the machine. A serial transmission line 4 connects the master station 1 to one or more of slave stations 2, and the arrow indicates the direction in which serial transmission data is transmitted. With reference to the serial transmission link 4, the master stations 1 are on the "numerical controller (N/C) unit side" while the slave stations 2 are on the "remote control unit side".
As shown in FIG. 11, the SERCOS embodies a topology wherein a plurality of master stations 1 may be contained in a numerical control mechanism, and each master station may have a respective plurality of slave stations 2 interfacing with a corresponding one or more drive controllers 3, and may be linked to its respective slave stations in a ring-form by serial transmission line 4.
The particular specifications of the serial transmission line 4 in the SERCOS may be described with reference to FIGS. 12 to 16.
First, with respect to signal format, serial transmission between a master station 1 and its corresponding slave stations 2 employs a format similar to the High Level Data Link Control (HDLC) protocol (frame configuration. . .JIS X5104) as shogun in FIG. 12. The format comprises a start FLAG, serving as a first multi-bit frame delimiter, an address field comprising a destination address DA and a source address SA, a data field D, a frame check field FCS and an end FLAG. A FLAG may comprise 8 bits, such as the sequence 0111 1110 representing the nun%her "7E" in hexadecimal. The address fields DA and SA each may comprise eight bits and the data field D may comprise a plurality of eight bit groupings. The frame check sequence field FCS is fixed at 16 bits. The conventional HDLC protocol may be consulted for more information on the frame configuration and, therefore, will be omitted herein.
Second, with respect to transmission timing, it should be noted initially that the serial transmission line 4 may comprise an optical fiber transmission path, as shown in FIG. 15. The optical fiber cable is interfaced to transmission equipment by connectors conforming to the SMA standard (IEC86B(C020)). In FIG. 15, a TTL signal is input to a transmission end comprising a driver circuit 20, which controls the operation of an LED within an SMA housing 21. The light output of the diode is directed by an SMA connector 22 to a plastic optical fiber 23. At the receiving end, a similar connector 22 directs the light signals to a photodiode with an amplifier integrated circuit contained in an SMA housing 24. The transmitted signal is thus converted from optical to TTL for subsequent processing at the receive end.
Since only one optical fiber transmission path is employed in a ring foden, a transmission clock and transmission data are multiplexed for transmission and then separated and extracted from the sent signal on the receive end. NRZI (No Return to Zero Inverted) coding shown in FIG. 14 is employed to create this signal by multiplexing the transmission clock and transmission data. Downward arrows in FIG. 14 indicate the change points of the transmission clock. An example of the NRZI coding achieved by combining the bottom transmission data of 0 and 1 and the top transmission clock is given as a waveforth shown in the middle, which is inverted in accordance with the timing of the transmission clock sending data "0".
The receive end extracts the transmission clock based on the timing of the wavefoden inversion, samples the wavefoden in accordance with the timing of the transmission clock extracted, and determines the values of 0 and 1 for the transmission data.
FIG. 13 illustrates a time allocation of the data transmitted through the transmission line, wherein MST indicates transmission timing data from the master station 1 to the slave stations 2, wherein AT1, AT2 to ATX indicates transmission data from the slave stations 2 to the master station 1, and MDT indicates transmission data from the master station 1 to the slave stations 2.
For specific data, a transmission cycle (TCYC, e.g. 1.7 ms) is determined in accordance with the MST timing. The MST is a frame including system modes (start-up, operation and other modes), etc. and chiefly functions to establish synchronization with the slave stations. The AT1, AT2, ATX are frames transmitted from the slave stations to the master station a specified period of time (T1.1, T1.2 to T1.X) after the transmission of the MST; such frames include motor position data, motor speed data, motor current data, alarm status, etc. of the servo amplifiers and spindle amplifiers serving as the slave stations.
The MDT frame transmitted by the master station, at a time T2 after the transmission of the MST frame, includes data such as motor drive commands to the servo amplifiers and spindle amplifiers and mode designation (constant surface-speed control mode, C-axis control mode, etc.) to the servo amplifiers and spindle amplifiers.
As described above, the communication between the master station 1 and the slave stations 2 during the TCYC cycle permits the functions of the numerical controller to be achieved.
FIG. 16 is a general connection block diagram where two slave stations are connected to one master station. In FIG. 16, the master controller 1 represents the master station, and the slave controller 2A and slave controller 2B represents the slave stations #1 and #2, respectively. A clock 30 is operative to generate a clock signal TXCLK which is input to the master station controller and to a flip flop 31. The master station controller outputs a data signal TXD and a transmission switching signal IDLE which, together with the flip flop 31 output signal, are received by multiplexer 32. The multiplexer 32 is a transmission signal switching circuit where either of two input signals is selected, thereby generating the NRZI signal for transmission to the several slave stations. The NRZI signal in TTL form is provided to the transmission end 33 which converts the electrical signal to an optical signal for transmission along optical link 34A.
At a first receive end 35, a conversion is made from an optical signal into an electrical signal. The output of the receive end is connected to a receive signal regeneration section 36 for separating the received NRZI signal into receive data RXD and receive clock RCLK, which are then provided to the controller 2A for slave #1. The receive clock and data are processed by the controller 2A for slave #1 and the controller is operated accordingly.
The receive clock RCLK also serves as a transmit clock and is processed by the slave #1 controller in a manner similar to the way that the signal TXCLK is processed by master controller 1. In addition to the slave #1 controller, the receive data RXD also is provided to a multiplexer 37, which generates NRZI signals in further response to a transmit data TXD and switching signal IDLE from the controller 2A of slave #1. Transmit end circuit 38 functions in a manner similar to circuit 33. Also, the comparable elements 39-42 for slave #2 and the receive elements 43, 44 for master station 1 function in a manner corresponding to similar elements 35 and 36 in slave #1. The connection of the stations by lines 34A-34C defines a ring topology.
A first problem to be solved in the conventional communication system, configured as described above, is that synchronization must be established in accordance with the master synchronization frame MST transmitted by the master station to the slave stations in order to ensure exact synchronization of the master station and the slave stations connected to the master station. The use of the dedicated master synchronization frame MST to establish synchronization, results in low transmission efficiency.
The maintenance of synchronization is extremely important and in most applications cannot be compromised. For example, where the master station is a numerical controller that allows synchronous control of a plurality of axes (e.g. X, Y and Z axes) and the slave stations are servo amplifiers and/or spindle amplifiers, lack of synchronization of the master and slave stations causes the axes driven from the servo amplifiers to move separately on a time basis or the axis driven from the servo amplifiers and the spindles driven from the spindle amplifiers to operate individually on a time basis. As a result, the intended machining would not be accomplished accurately.
The synchronization problem explained with respect to the simple system of FIG. 16 is further amplified in a more complex system, such as one with multiple remote stations. FIG. 17 is a schematic configuration diagram of a conventional numerical control unit which employs sequence processing and has multiple remote units operating under its central command. In the Figure, a numerical control unit 51 comprises a plurality of sections 51A-F and is connected to a plurality of remote control units 52 via serial transmission line 54A operating in accordance with the HDLC protocol. An operator control station 53 comprises a communication interface 53A that is connected to section 51E of the numerical control unit 51, an operation board 53B (and/or keyboard) for an operator to carry out control, and a display section 53C. From section 51C, the N/C unit can have direct control of operational machining elements, such as servo amplifiers 55 and spindle amplifiers 56, which operate servo motors 57 and spindle motors 58, respectively. Because the I/O slots for the printed circuit boards in an NC device are limited, an external or remote device having an I/O and CPU may be connected to provide control for additional motors. Thus, from section 51B, the N/C unit can have indirect control of additional operational machining elements via the remote control units 52. In that case, a machine I/O section 51A of the numerical control unit 51 and a machine interface 59, which also connects to the machine I/O sections 52A of each remote control unit 52, also are connected via lines 54B and 54C.
In operation, a sequence program for executing the machine sequence of a machine tool used with the numerical control unit 51 is included in the numerical control unit 51 for the execution of machine sequence processing. Results of the sequence-processing by the numerical control unit 51 are transmitted under the HDLC protocol via lines 54B to the machining interface 59 for further input to the remote control units 52. Information concerning the operation of the remote unit machining are also transmitted via the interface and lines 54C, and under the HDLC protocol to the numerical control unit 51, which then performs further sequence processing thereon.
Based on this design, a second problem in the conventional art is that the timing of the machine I/O processing in the numerical control unit 51 and the remote control units 52 are not considered in the conventional system of FIG. 17. As a result, timing errors occur between the machine I/O processings of the numerical control unit 51 and the remote control units 52.
A third problem with systems that use a HDLC or similar frame, as seen in FIG. 12, is the existence of transmission errors. If there is a transmission error in the frame check sequence code that is used to detect errors in an address or data, or in an address section or in a data section in the frame, the frame itself will simply become meaningless. However, such errors will not cause any transmission problems. But since there is only one start and one end flag in a HDLC or similar frame, errors typically will originate with those flags.
For example, a noise component, having a short pulse width and a relatively low frequency, called power source noise, (for example, drawing in FIG. 19) may overlap either or both flags in the HDLC frame, as is shown for HDLC frames F1, F2 and F3 in FIG. 18. In this case in FIG. 19, the transmission line noise has a period of 20 msec (50 Hz) and will interfere with the integrity of the transmission. As a result, the frame structure cannot be identified and a significant amount of time will be required to restore transmission to a normal state.
Specifically, if there is a transmission error in start flag at A1 in frame F1 in FIG. 18, the slave station will continue to wait for a start flag since start flag A1 is not detected. Since slave flag A1 is blocked, the end flag at B1 may be mistakenly perceived as the start flag. Even if start flag at A1 is recognized, but if end flag at B1 is not identified due to a transmission error, the start flag at C1 in Flame F2 may be mistakenly identified as an end flag. In addition, if either flag of a standard HDLC transmission frame is not detected due to transmission line noise, etc., it is difficult to restore a transmission cycle.
It is, accordingly, an object of the present invention to overcome the disadvantages in the conventional art by providing a communication system which solves the first problem by allowing synchronization to be established between the master station and the slave stations without employing any special synchronization frame.
It is a further object of the present invention to provide a communication system that can operate more efficiently than the conventional system, and at a higher speed.
It is yet another object of the present invention to provide a communication system in which timing is established on the basis of data transmission by the master station to the slave stations.
Another object of the present invention is to overcome the second problem in the conventional art by matching the I/O timing between the numerical control unit and the machine interface of the machine at the numerical control unit I/O section and the remote control unit I/O sections, thereby improving I/O timing accuracy.
A further object is to solve the third problem in the conventional art and achieve transmission between the numerical control unit and the remote control units which is not affected by data errors due to transmission line noise.